package com.atguigu.java1;

/**
 * @author : leimingchao
 * @date Date : 2021年06月26日 8:53
 */
//jdk8之前的写法
// @MyAnnotations(value = {@MyAnnotation(value = "hi"),@MyAnnotation(value = "abc")})

@MyAnnotation(value = "hi")
@MyAnnotation(value = "abc")
public class Person {

    private String name;
    private Integer age;

    public Person() {
    }

    public Person(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public void walk() {
        System.out.println("人走路");
    }

    public void eat() {
        System.out.println("人吃饭");
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
